package com.hst.capacity.domain.model.entity;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.time.LocalDateTime;
@Data
@MappedSuperclass
public class BaseEntity {

    @Column(updatable = false)
    private  String createBy="capacity";

    @CreationTimestamp
    @Column(updatable = false)
    private LocalDateTime createTime;

    @Column(insertable = false)
    private  String updateBy="capacity";

    @UpdateTimestamp
    @Column(insertable = false)
    private LocalDateTime updateTime;

    public BaseEntity() {
        this.createBy = "capacity";
    }
}
